# -*- coding: utf-8 -*-
"""
Created on Thu Sep 08 17:18:58 2016

@author: Luoge
"""

from sklearn.metrics.cluster import normalized_mutual_info_score
import pandas as pd

if __name__ == '__main__':
    mi = normalized_mutual_info_score([0, 0, 1, 1], [0, 0, 1, 1])
    print(mi)
    
    df = pd.read_csv("ZG325-rainfall-reservoir.csv")
    rainfall = df.iloc[:,0]
    zg325_f3 = df.iloc[:,7]
    MutualInfo_sklearn = normalized_mutual_info_score(rainfall.ravel(), zg325_f3.ravel())